<!DOCTYPE html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <meta name="viewport" content="width=device-width, initial-scale=1.0">
    <title>Document</title>
</head>
<body>
    <div id="output"></div>
    <script src="web/fetch.js"></script>
    <button onclick="getFetch()">读取按钮</button>
    <script>
        var ouput = document.getElementById("output")
        // window.fetch = null
        console.log("fetch:",fetch)
        function getFetch(){
            fetch("hi.txt").then(function(response){
                // console.log()
                response.text().then(function(text){
                    // alert(text)
                    ouput.innerText = text
                })
            })
        }
    </script>
</body>
</html>
